<html>
  <head>
  </head>
  <body>
    <script language="javascript" src="/js/enlargeImg.js">
    </script>
    <script language="javascript">
      <!--
	  function setAutoSize() {
          dealDIVWithClass(".autoSize");
	  }
	  //-->
    </script>
    <script type="text/javascript">
      var _isIE = navigator.userAgent.toLowerCase().indexOf('msie') >= 0;
    </script>
    <style type="text/css">
      a {
      border:0px;
      }
      img {
      border:0px;
      }
    </style>
    <div class="container" width="100%">
      <div height="40px">
	<div style="float:left;padding:0px;"><nobr>
	    <span><a href="http://www.sevenever.com/"><img src="/img/logo32.gif" alt="logo"></a></span>
	</nobr></div>
	<div style="text-align:right;height:36px;">
	  <b>{{user.nickname}}</b>
	  | <a href="/">home</a>
	  {% if user %}
	  | <a href="/logout">sign out</a>
	  {% else %}
	  | <a href="{{login_url}}">sign in with a google accout</a>
	  {% endif %}										  	
	</div>
      </div>
    </div>
    <div style="height:50px;">
      <table>
	<tr><td>
	    steal a file from: 
	    <input id="urltosteal" type="text" size="50" value="Input image url here." onclick="if(this.value=='Input image url here.') this.value='';" onblur="if(this.value=='') this.value='Input image url here.';">
	    <input type="button" value="steal!" onclick="window.location='{{host_url}}/steal/' + document.getElementById('urltosteal').value;">
	</td></tr>
      </table>
    </div>
    <div>
      <table width="100%">
	<tr>
	  <td align="center">
	    <div class="autoSize">
	      {% for img in imgs %}
	      <div>
		<div>
		  <table width="600px" style="border-width:1px;border-style:solid;"><tr>
		      <td width="160px">
			<div style="border-width:1px;text-align:center;vertical-align:middle;border-style:solid;height:160px;width:160px;">
			<a href="/look/{{img.imgId}}"><img src="/thumbnail/{{ img.imgId }}" alt="{{ img.imgId }}"></a>
			</div>
		      </td>
		      <td>
			viewed ({{img.accessTimes}}) times<br/>
			<input type="text" size="50" value="{{host_url}}/look/{{img.imgId}}" onmouseover="this.select(-1);" onclick="this.select(-1);"><br/>
			<a href="/look/{{img.imgId}}">view</a>
			<a href="/delete/{{img.imgId}}" onclick="return confirm('delete this image?')">delete</a>
			<br/>original from:<a href="{{img.originalURL}}">{{img.originalURL|slice:":30"}}...</a>
			<script type="text/javascript">
			  if(_isIE) {
			  var copyLink = '<br/><a href="#" onclick=\'window.clipboardData.setData("Text","{{host_url}}/look/{{img.imgId}}");\'>Copy URL</a>';
			  document.write(copyLink);
			  }
			</script>
		      </td>
		  </tr></table>
		  <br/>
		</div>
		<div>
		</div>
	      </div>
	      {% endfor %}
	    </div>
	  </td>
	  <td>
	  </td>
	</tr>
      </table>
    </div>
    <div>
      <table width="100%" align="center"><tr><td align="center">
	    <a href="http://code.google.com/appengine/">
	      <img src="http://code.google.com/appengine/images/appengine_lowres.jpg"></a>Powered by GAE
      </td></tr></table>
    </div>  
</div>
</body>
</html>
